package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.common.R;
import com.itheima.reggie.entity.Dish;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishMapper extends BaseMapper<Dish> {

    @Select("select d.name,d.image,d.category_id,d.price,d.status,d.update_time from dish d inner join category on d.category_id = category.id limit #{page},#{pageSize}")
    List<Dish> pageByPage(Integer page, Integer pageSize);
}
